package com.team.RunsFast_Api.dto;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.team.runsfast.entity.Coupon;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
public class CouponDto {
    private Long id;
    /**优惠券数量*/
    private Integer num;
    /**满足限制金额*/
    private double stintmoney;
    /**优惠金额*/
    private double discountprice;
    /**优惠券的有效天数*/
    private Integer days;
    /**优惠券信息*/
    private String info;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date ctime;

    private Long coupinfoid;


    public CouponDto(Long id, Integer num, double stintmoney, double discountprice, Integer days, String info, Date ctime, Long coupinfoid) {
        this.id = id;
        this.num = num;
        this.stintmoney = stintmoney;
        this.discountprice = discountprice;
        this.days = days;
        this.info = info;
        this.ctime = ctime;
        this.coupinfoid = coupinfoid;
    }
}
